package com.gues.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Date;

@Controller
public class HomePageController {

    @RequestMapping({"/", "/home"})
    public String home() {
        return "home";
    }

    @RequestMapping("/news")
    public String news() {
        return "news";
    }

    @RequestMapping("/time")
    public String time() {
        return "time";
    }

    @RequestMapping("/about")
    public String about() {
        return "about";
    }

    @RequestMapping("/test")
    public @ResponseBody
    Date test() {

        return new Date();
    }
}
